
REVFLAGS	= -D_REVISION=$(REVISION)

CC              = gcc
CFLAGS          ?= -g -W -Wall -O3
OPTFLAGS        = -D_FILE_OFFSET_BITS=64

iCC             = /opt/intel/cc/9.0/bin/icc
iCFLAGS         = -w -mcpu=pentiumpro -march=pentiumpro
iOPTFLAGS       = -O3 -ip -ipo -D_FILE_OFFSET_BITS=64
PROF_DIR	= $(PWD)/prof

destdir         =
prefix          = /usr/local
bindir          = $(prefix)/bin
sbindir         = $(prefix)/sbin

BINFILES        = bigassinteger
SBINFILES       = bigassinteger


bnum: src/bignum.c src/utility.c src/bcd.c src/bin.c
	$(CC) $(CFLAGS) $(OPTFLAGS) $(REVFLAGS) src/bignum.c src/utility.c src/bcd.c src/bin.c -o bnum

install: install -d $(destdir)$(sbindir)
	install -m 755 $(SBINFILES) $(destdir)$(sbindir)

uninstall:
	-rm -f $(destdir)$(bindir)/bigassinteger

clean:
	-rm -f $(SBINFILES) $(BINFILES) $(TESTFILES) $(OPTFILES)

distclean: clean

